/**
 * @fileoverview   event/base event基础模块，定义event，一些所有event模块会用的方法等

 * @date: 12-1-5
 * @time: 上午11:43
 * @author 2kid
 * @version 0.1
 */
/**
 *
 *
 * event
 * 属性：
 * event._keyCode
 *
 */
F.reg('event/base', function (f, dom) {
    var win = window, doc = win['document'], docElement = doc.documentElement;

    /**
     * @name F.Event
     * @Object
     * @namespace 事件模块 <br>
     * 事件对象 e <br>
     * e.target 获得事件对象的目标 <br>
     * e.relatedTarget <br>
     * e.wheelDelta <br>
     * e.pageX <br>
     * e.pageY <br>
     * e.clientX <br>
     * e.clientY <br>
     * e.prevent() 阻止事件默认动作 <br>
     * e.stop() 停止事件传播 <br>
     * e.returnval(val) beforeunload 事件时，设置的返回值 <br>
     * e.altKey <br>
     * e.ctrlKey <br>
     * e.shiftKey <br>
     * e.keyCode <br>
     *
     */


    var Event = {
        /**
         * @name F.Event.keyCode
         * @Object
         * @namespace 事件 keyCode 对应常量
         * @example
         * keyCode
         * {
             A: 65,
             ALT: 18,
             APOSTROPHE: 192,
             B: 66,
             BACKSLASH: 220,
             BACKSPACE: 8,
             C: 67,
             CAPS_LOCK: 20,
             CLOSE_SQUARE_BRACKET: 221,
             COMMA: 188,
             CONTEXT_MENU: 93,
             CTRL: 17,
             D: 68,
             DASH: 189,
             DELETE: 46,
             DOWN: 40,
             E: 69,
             EIGHT: 56,
             END: 35,
             ENTER: 13,
             EQUALS: 187,
             ESC: 27,
             F: 70,
             F1: 112,
             F2: 113,
             F3: 114,
             F4: 115,
             F5: 116,
             F6: 117,
             F7: 118,
             F8: 119,
             F9: 120,
             F10: 121,
             F11: 122,
             F12: 123,
             FIVE: 53,
             FOUR: 52,
             G: 71,
             H: 72,
             HOME: 36,
             I: 73,
             INSERT: 45,
             J: 74,
             K: 75,
             L: 76,
             LEFT: 37,
             M: 77,
             MAC_ENTER: 3,
             MAC_FF_META: 224,
             META: 91,
             N: 78,
             NINE: 57,
             NUMLOCK: 144,
             NUM_CENTER: 12,
             NUM_DIVISION: 111,
             NUM_EIGHT: 104,
             NUM_FIVE: 101,
             NUM_FOUR: 100,
             NUM_MINUS: 109,
             NUM_MULTIPLY: 106,
             NUM_NINE: 105,
             NUM_ONE: 97,
             NUM_PERIOD: 110,
             NUM_PLUS: 107,
             NUM_SEVEN: 103,
             NUM_SIX: 102,
             NUM_THREE: 99,
             NUM_TWO: 98,
             NUM_ZERO: 96,
             O: 79,
             ONE: 49,
             OPEN_SQUARE_BRACKET: 219,
             P: 80,
             PAGE_DOWN: 34,
             PAGE_UP: 33,
             PAUSE: 19,
             PERIOD: 190,
             PRINT_SCREEN: 44,
             Q: 81,
             QUESTION_MARK: 63,
             R: 82,
             RIGHT: 39,
             S: 83,
             SEMICOLON: 186,
             SEVEN: 55,
             SHIFT: 16,
             SINGLE_QUOTE: 222,
             SIX: 54,
             SLASH: 191,
             SPACE: 32,
             T: 84,
             TAB: 9,
             THREE: 51,
             TWO: 50,
             U: 85,
             UP: 38,
             V: 86,
             W: 87,
             WIN_IME: 229,
             WIN_KEY: 224,
             WIN_KEY_RIGHT: 92,
             X: 88,
             Y: 89,
             Z: 90,
             ZERO: 48
         }
         *
         */

        keyCode:{
            A:65,
            ALT:18,
            APOSTROPHE:192,
            B:66,
            BACKSLASH:220,
            BACKSPACE:8,
            C:67,
            CAPS_LOCK:20,
            CLOSE_SQUARE_BRACKET:221,
            COMMA:188,
            CONTEXT_MENU:93,
            CTRL:17,
            D:68,
            DASH:189,
            DELETE:46,
            DOWN:40,
            E:69,
            EIGHT:56,
            END:35,
            ENTER:13,
            EQUALS:187,
            ESC:27,
            F:70,
            F1:112,
            F2:113,
            F3:114,
            F4:115,
            F5:116,
            F6:117,
            F7:118,
            F8:119,
            F9:120,
            F10:121,
            F11:122,
            F12:123,
            FIVE:53,
            FOUR:52,
            G:71,
            H:72,
            HOME:36,
            I:73,
            INSERT:45,
            J:74,
            K:75,
            L:76,
            LEFT:37,
            M:77,
            MAC_ENTER:3,
            MAC_FF_META:224,
            META:91,
            N:78,
            NINE:57,
            NUMLOCK:144,
            NUM_CENTER:12,
            NUM_DIVISION:111,
            NUM_EIGHT:104,
            NUM_FIVE:101,
            NUM_FOUR:100,
            NUM_MINUS:109,
            NUM_MULTIPLY:106,
            NUM_NINE:105,
            NUM_ONE:97,
            NUM_PERIOD:110,
            NUM_PLUS:107,
            NUM_SEVEN:103,
            NUM_SIX:102,
            NUM_THREE:99,
            NUM_TWO:98,
            NUM_ZERO:96,
            O:79,
            ONE:49,
            OPEN_SQUARE_BRACKET:219,
            P:80,
            PAGE_DOWN:34,
            PAGE_UP:33,
            PAUSE:19,
            PERIOD:190,
            PRINT_SCREEN:44,
            Q:81,
            QUESTION_MARK:63,
            R:82,
            RIGHT:39,
            S:83,
            SEMICOLON:186,
            SEVEN:55,
            SHIFT:16,
            SINGLE_QUOTE:222,
            SIX:54,
            SLASH:191,
            SPACE:32,
            T:84,
            TAB:9,
            THREE:51,
            TWO:50,
            U:85,
            UP:38,
            V:86,
            W:87,
            WIN_IME:229,
            WIN_KEY:224,
            WIN_KEY_RIGHT:92,
            X:88,
            Y:89,
            Z:90,
            ZERO:48
        },
        _getelem:function (sel) {
            return dom.query(sel).get();
        }
    };


    return Event;

}, {
    requires:['dom']
});
/*
 f.need(['dom','event/base'],function(f,dom){

 });

 event
 1:event
 event/base,event/handle
 2:event/handle
 event/base,dom
 3:dom
 event/base,dom/base,dom/attr,dom/css
 4:dom/css
 event/base,dom/base,dom/attr
 5:dom/attr
 event/base,dom/base
 6:dom/base
 event/base
 7:dom




 */


